Skip to content

automate building Release Candidate in github action #1391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Feb 2, 2025

Conversation

kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Dec 1, 2024

Related to #1306 and #872
Devlist discussion: https://lists.apache.org/thread/oowhcfwv3fcjzdzm76tbn99k5q84mr75

This PR changes .github/workflows/python-release.yml to build the artifacts for both svn and pypi and update the "how to release doc" to match the new process. Other improvements related to the release process are also included:

  • Trigger GitHub Action on tag push
  • Trigger GitHub Action manually with required input fields for both version and rc
  • Validate version and rc from either tag or manual input
  • Validate version against the current library version
  • Changed actions/checkout@v4 fetch-depth from 0 to 1 to fetch only a single commit (fetch-depth 0 fetches all history for all branches and tags)
  • Generate artifact for SVN named svn-release-candidate-${VERSION}rc${RC}
  • Generate artifact for PyPi named pypi-release-candidate-${VERSION}rc${RC}, set library version to one with RC (e.g. 0.8.1rc1, same behavior as before)

Final release process should look something like this

  • prepare local branch for release (main for major/minor, branch for patch release)
  • Create and push tag with RC (e.g. 0.8.1rc1)
  • Tag push automatically triggers the GitHub Action
  • Github action builds artifacts for both svn and pypi
  • Download svn artifact, create checksum and signature, and upload to SVN dev dist
  • Download pypi artifact and upload to PyPi
  • Send vote email
  • Once passed, download artifact from SVN dev dist, upload to SVN release dist and pypi
  • If a new RC is needed, create and push another tag with RC (e.g. 0.8.1rc2)

Testing

@kevinjqliu
Copy link
Contributor Author

@Fokko could you take a look at this PR when you get a chance?
I tested the new action and instructions via my fork, had to push this branch to main on my fork in order to run the GitHub Action.

@kevinjqliu kevinjqliu added this to the PyIceberg 0.9.0 release milestone Feb 1, 2025
push:
tags:
# Trigger this workflow when tag follows the versioning format: pyiceberg-<major>.<minor>.<patch>rc<release_candidate>
# Example valid tags: pyiceberg-0.8.0rc2, pyiceberg-1.0.0rc1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 In line with the current tags: https://github.com/apache/iceberg-python/tags


- name: Install Poetry
run: |
pip install poetry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reuse make install-poetry here? In the Makefile we pin the version of Poetry

Copy link
Contributor Author

@kevinjqliu kevinjqliu Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! changed

we use make install-poetry in other places for github action
https://grep.app/search?f.repo=apache%2Ficeberg-python&f.repo.pattern=iceberg-python&q=make+install-poetry

@kevinjqliu kevinjqliu force-pushed the kevinjqliu/run-pypi-and-svn branch from e60ab87 to e0e68a3 Compare February 2, 2025 19:52
fi

# SVN
svn_build_artifacts:
Copy link
Contributor

@Fokko Fokko Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, should we use dashes here?

Suggested change
svn_build_artifacts:
svn-build-artifacts:

Same for some other jobs below

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow makes sense to me. Let's give this a shot for the 0.9.0 release 👍


![Github Actions Run Workflow for SVN Upload](assets/images/ghactions-run-workflow-svn-upload.png)
If `gh` is available, watch the GitHub Action progress using:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@kevinjqliu
Copy link
Contributor Author

had to add an unrelated change in mkdocs/docs/api.md. The url referenced is dead, causing CI to fail

@kevinjqliu kevinjqliu merged commit fa78256 into apache:main Feb 2, 2025
3 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/run-pypi-and-svn branch February 2, 2025 20:50
@kevinjqliu
Copy link
Contributor Author

Thanks for the review @Fokko :)

@Fokko
Copy link
Contributor

Fokko commented Feb 3, 2025

Any time, sorry for taking so long :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants